Ranking Mechanics
The information on this page is based on Elona 1.22's source code. Any changes in Elona Plus, Omake, etc will not be reflected. The game's journal ranks are controlled by several common core mechanics. This page serves as a technical explanation of how the game actually tracks player ranks and raises or lowers them. General Information There are a total of 8 ranks that the game keeps track of *Arena *Pet Arena *Adventurer *Museum *Home *Shop *Voter *Guild In addition, there is a dummied out "Fishing" rank - while it is allocated in the game's memory (in fact, it's listed before guild rank) it is never actually used. Rank Storage Exact ranks are never truly stored. Rather, the game stores the rank on a scale of 10000 to 100 - the actual player rank is this value divided by 100 (rounded down). So for example if the player's real arena rank is 1050 then they will see "Rank 10" in their journal. Changing Ranks - Standard All rank changes except for Museum and Home are based on a single function that takes 3 parameters: the rank ID (corresponding to the list above), the amount to change the rank by, and a limit to the maximum change in player rank allowed. This function goes through the following process, where Raw Rank refers to the aforementioned 10000 to 100 value and Actual Rank refers to the scaled 100 to 1 value: *If the rank change is positive, **Scale it so that Scaled Change = \frac{Base Change}{2500} * \left(Actual Rank + 20\right)^2 **If the \frac{Scaled Change}{100} > Limit , set the actual change value to 200 * Limit. Interestingly, this means the actual limit is double the listed limit - eg, a limit of "2" means a max change of 400 (4 ranks). **'Note that negative changes are not scaled or limited!' *''Subtract'' the change amount from the Raw Rank. Note that if the change is negative this means the Raw Rank increases. **If the new rank value is > 10000, set it to 10000 **If the new rank value is < 100, set it to 100 *If the result of rounding down \frac{Raw Rank}{100} has changed (ie, if Actual Rank would be different) **Display the message "Ranking Change old -> new ". The text color depends on the direction - if it was negative (eg, 50 -> 49) display it in green, if it was positive display it in purple. *If the Actual Rank would not change - eg, if the old Raw Rank was 5050 and the new is 5025 **If the raw rank decreased at all, display "You are one step closer to the next rank". If the raw rank increased or stayed the same then nothing will be displayed. An interesting note is because of how this system works, the message "You are one step closer to the next rank" will continue to be displayed from raw rank 199 to 100 even though the player's journal will always display Rank 1 (the message will stop altogether when raw rank 100 is reached as that is the minimum). Because the ranking change is scaled by \left(Actual Rank + 20\right)^2 the actual effect of the change value passed to this function decreases quadratically, making achieving lower and lower ranks take drastically more advancement points. Noa accounted for this in his calls to modify ranks and as such every ranking change call will always use the same rank values. Gaining Ranks As stated above, Noa used constant values for rank changes. The following are the values used to call the rank modification function when gaining ranks (ie, when raw rank would decrease). The first number is the Base Change in the previous section, the latter is the change limit. *Arena: Change 100, Limit 2 *Pet Arena: Change 100, Limit 2 *Adventurer: Change 300, Limit 8 *Shop: Change 30, Limit 2 *Voter: Change 100, Limit 5 *Guild: Change 500, Limit 8 Losing Ranks Arena, Pet Arena, Adventurer, and Voter ranks need to be actively maintained. If their respective actions are not done then after a set number of days the game will invoke the same rank change function with a negative change. Since rank loss is not scaled by current rank or limited in the actual ranking change function, the value of the rank change it is scaled by current rank - namely, Rank Change Value = - 1 * \left(\frac{Raw Rank}{12} + 100\right) In addition, on losing in the Arena or Pet Arena, the rank change function will be called with -100 (exact loss of 1 rank). Changing Ranks - Museum and Home Unlike the other 6 rank types, Museum and Home rank are determined by the values items placed on the ground and are updated every time an item is dropped or picked up. Museum When an item is dropped or picked up in a museum, the following process is run *For every item in the museum, **If the quantity is somehow 0, ignore it **If it is not a figure or card, ignore it **If there are 4 or more items on the same tile, skip it **Determine the museum value of what this item depicts. This is dependent on level scaled by if the NPC is unique or "rare" (bit flag). **Add the value to the museum's total value if it is a figure or half if it is a card *Calculate the raw rank directly as 10000 - Total Value. If this is < 100, set it to 100. *If the rank has changed, display the message "Museum Rank: old -> new Your museum is now known as ". If the change was negative (eg 50 -> 49) use green text, otherwise use purple. This also means'' if you have more than one museum then the last one an item was dropped/picked up in is the one used for ranking. At this point the number of people in the museum will also change to \frac{100 - Actual Rank}{2} + 1 Exact NPC value referenced above: *If the NPC is unique, Value = level + 70 *If the NPC is not unique, **Value = level / 10 * 2 **If the NPC is two tiles tall, Value = Value * 3 / 2 + 40 **If NPC "rarity" is < 80, Value = Value + 80 - rarity *If there are ''multiple copies of this NPC (even if one is a figure and one is a card) **Value = Value / 3 **If Value > 15, Value = 15 Home When an item is dropped or picked up in a house, the following process is run *If you're not on the ground floor, stop (only the ground floor counts) *An array is set up to track the 10 most valuable heirlooms. *For every item in the house **If there are somehow 0, ignore it **If there are 4 or more items on the same tile, skip it **If the item is furniture, calculate its value / 50. If this is > 50 and < 500, increase furniture value by that amount. Otherwise, increase furniture value by the appropriate boundary (50 lower, 500 upper). **Calculate the item's value. If it's furniture, divide by 20. If it's a plant, divide by 10. If it's ore, divide by 10. Otherwise, divide by 1000. This is the item's heirloom value. **If this item's heirloom value is higher than the lowest of the 10 being tracked, it replaces the lowest. *For every entry in the 10 most valuable heirlooms array **If an heirloom was recorded, if its value is > 100 and < 2000 add it to the house's heirloom value. Otherwise, increase the house heirloom value by the appropriate boundary (100 lower, 2000 upper). *If furniture value is > 10000, set it to 10000. If heirloom value is > 10000, set it to 10000 *Calculate the new raw rank as 10000 - \frac{House Base Value + Furniture Value + Heirloom Value}{3} *If the new raw rank is < 100, set it to 100 *Store this new rank *If the rank has changed, display the message "Furniture Value: value Heirloom Value: value Home Rank: old -> new Your home is now known as ". If the change was negative (eg 50 -> 49) use green text, otherwise use purple. Category:Technical information